1. Field of the Invention
The present invention relates to a three-dimensional measuring device and three-dimensional measuring method for non-contact measuring of an object shape by illuminating an object with light.
2. Description of the Related Art
Three-dimensional measuring devices of the non-contact type commonly referred to as rangefinders are used for data input to CG systems and CAD systems, somatometry, robot visual recognition and the like because it is possible to measure at high speed compared to contact type devices. The optical slit projection method (also referred to as the light section method) is known as suitable measuring method for rangefinders. This method produces a three-dimensional image (distance image) by optically scanning an object, and is one type of active measuring method for imaging an object illuminated by a specific light. The three-dimensional image is a collection of pixels representing the three-dimensional positions of a plurality of parts on an object. In the optical slit projection method the section of a linear slit light is used as the detection light.
FIGS. 46a, 46b, 46c, and 46d briefly show the optical slit projection method, and FIGS. 47a, 47b, and 47b illustrate the principles of measurement via the optical slit projection method.
A section of object Q serving as a measurement subject is illuminated by a thin band-like slit light U, and, the light reflected from the object Q impinges, for example, the imaging surface S2 of a two-dimensional image sensor (FIG. 46a). If the illuminated portion of object Q is flat, the sensed image (slit image) is a straight line (FIG. 46b). If the illuminated portion is uneven, the straight line becomes curved and step-like (FIG. 46c). That is, the magnitude of the distance between the measuring device and the object Q is reflected at the incident position of the reflected light on imaging surface S2 (FIG. 46d). Three-dimensional position sampling can be accomplished by scanning the object surface on a range viewed from the light reception side by deflecting the slit light U perpendicular to the length direction. The number of points of this sampling is dependent on the number of pixels of the image sensor.
In FIGS. 47a, 47b, and 47c, the light emitting system and light receiving system are positioned such that the base line AO connecting the origin A of the projection light and the principal point of the light reception lens is perpendicular to the optical axis of received light. The principal point of the lens is a point on the receiving optical; axis separated from the sensing surface S2 only by the so-called image distance b when the image of an object at infinite distance is formed on imaging surface S2. The image distance b is the sum of the focal length f of the light receiving system and the amount of lens extension for focusing adjustment.
The principal point O is the origin of the three-dimensional orthogonal coordinates. The light reception axis is the Z axis, the base AO is the Y axis, and the slit light length direction is the X axis. When the slit light U illuminates point P (X,Y,Z) on the object, and the angle of the projection axis and projection reference plane (projection plane parallel to the light reception axis) is designated .theta.a, and the light reception angle is designated .theta.p, the coordinates Z of point P are expressed by the equation below. EQU Base line length L=L1+L2=Z tan .theta.a+Z tan .theta.p .thrfore.Z=L/(tan .theta.a+tan .theta.p)
The light receiving angle .theta.a is the angle formed by a line connecting point P and principal point O, and the plane including the light reception axis (i.e., light reception axis plane).
Since the imaging magnification .beta.=b/z, when the distance between the center of imaging surface S2 and the light reception pixels in the x direction is designated xp and the distance in the Y direction is designated yp (refer to FIG. 47a), the coordinates X,Y of point P are expressed by the equations below. EQU X=xp/.beta. EQU Y=yp/.beta.
The angle .theta.a is unconditionally determined by the angular speed of deflection of slight light U. The light reception angle .theta.p is calculated from the relationship: tan .theta.p=b/yp. That is, the three-dimensional position of point P can be determined based on the angle .theta.a by measuring the position (xp,yp) on the imaging surface S2
When the light reception system is provided with a zoom lens unit as shown in FIG. 47c, the principal point O becomes the posterior side principal point H'. When the distance between the posterior side principal point H' and the anterior side principal point H is designated M, the Z coordinate of point P is expressed by the equation below. EQU L=L1+L2=Z tan .theta.a+(Z-M) tan .theta.p .thrfore.Z=(L+M tan .theta.p)/(tan .theta.a+tan .theta.p)
When an image sensing means is used which comprises an imaging surface S2 having a finite number of pixels as in, for example, a CCD sensor, in the measurement performed via the previously described slit light projection method, the measurement resolving power is dependent on the pixel pitch of the image sensing means. That is, the resolving power can be increased by setting the slit light U so that the width of said slit light U in the Y direction (scanning direction) impinges a plurality f pixels on the imaging surface S2.
FIG. 48 illustrates the principles of this measurement method.
When the reflectivity of the illuminated portion of the object is assumed to be uniform, the intensity of the received light is a normal distribution expanding on the Y direction. If the effective intensity range of this normal distribution is a plurality of pixels, the maximum intensity position (i.e., barycenter) can be measured in units under the pixel pitch by interpolation of the amount of light received by each pixel g. This interpolation fits the normal distribution to the amount of light received by each pixel. The X, Y, and Z coordinates are determined based on the barycenter determined by the aforesaid calculation. If this method is used, the actual resolving power is 1/8 to 1/10 pixels.
When measuring via the slit light projection method, the person doing the measurement determine the position and direction of the rangefinder, and sets the scanning range (image sensing range) of the object Q via a zoom operation as necessary. It is useful to display a monitor image of the sensed object Q at the same field angle as the scanning range to easily accomplish the aforesaid framing operation. In three-dimensional CG, for example, color information of the object Q as well as measurement data expressing the shape of the object Q are often required.
Conventional rangefinders have a spectral means (e.g., dichroic mirror) for separating the light transmitted through the light-receiving lens system into slit light and environmental light, and are constructed so as to produce a color monitor image at the same field angle as the distance information by directing the environmental light to a color image sensing means separate from the image sensing means used for measurement (refer to Japanese Unexamined Patent Application No. SHO 7-74536).
If a dichroic mirror is used as the aforesaid spectral means, the entering light can be separated by wavelength virtually without decreasing the amount of light.
In practice, however, there are no dichroic mirrors which have ideal wavelength selectivity for reflection or transmission of only the slit light. Therefore, conventionally a disadvantage exists insofar as the environmental light greatly affects measurements because light of a comparatively broad wavelength range including the slit light wavelength enters the image sensing means.
In order to increase the resolving power, the width (i.e., length in the scanning direction) of the slit light may be increased by stages of projection light by setting the width of the slit light on the image imaging surface S2 to a plurality of pixels. In so doing, the distribution of the intensity of the received light does not form a normal distribution when the illuminated portion (point P) is the border of an object color because the width in the Y direction of the slit light broadens on the object Q, thereby increasing measurement error.
In conventional devices, the projection light conditions are set such that the slit width is as narrow as possible on the object Q, and the width of the slit light U is broadened then impinges the imaging surface S2 by means of a filter or the like in the light reception system.
The narrowing of the width of slit light U is optically limited, however. The illumination range (slit width) on object Q broadens as the distance increases from the starting point A of the projection light. Accordingly, conventional devices are disadvantageous inasmuch as the measurement distance (distance between the measuring device and the object Q) at which measurement of a specific precision is possible is short regardless of the distribution of the reflectivity of the object Q.
In conventional devices, the mutual positional relationship between the light projecting device comprising the projection system and the device comprising the light receiving system is fixed, such that the constructions do not allow adjustment of the respective optical axes, not center axis line and scan direction.
Therefore, in conventional three-dimensional input cameras, twisting occurs among the mutual optical axes, center line axes, and scanning direction of the light projection device and light receiving device, such that said axes are not in the same plane and errors arise in the mutual positional relationships. These errors also occur in three-dimensional input cameras using a zoom lens, but these errors can be corrected with relatively easily based on calculations using correction data obtained by imaging.
When a three-dimensional input camera is provided with a zoom lens, however, correction data differ in accordance with the amount of operation and movement of the zoom lens, such that there are extremely large amounts of correction data and individual parameters which make it impossible to perform simple calculations due to the extreme complexity of error correction, and require a great deal of time for the calculation process. Thus, a further disadvantage is the inclusion of many errors in the input data, which make it impossible to perform accurate calculations.
Although the framing which determines the scanning range of the object Q can be performed with a high degree of freedom by providing a zooming mechanism in the rangefinder as in conventional devices, disadvantages arise inasmuch as when zooming the principal point of the light receiving system is moved on the optical axis and causes errors to occur in the triangular measurement.
Furthermore, when the light receiving system is provided with w zooming function, the imaging field angle changes due to said zooming. Therefore, the width of the slit light on the projection side must be adjusted in accordance with the zooming performed on the light receiving side so as to introduce the maximum width slit light U onto the imaging surface S2.
Conventional devices are provided with a passive type distance sensor as a rangefinder which allows variable imaging distances depending on mode of use. the range measurement result is used in autofocusing (AF), and setting the projection light intensity.
The aforesaid passive type distance sensors produce large errors due to lens focal length, subject contrast distribution and the like. In contrast, rangefinders are capable of active type precision range measurement using a measurement-specific optical system. Measurement conditions including the autofocus lens position, and detection light projection angle range can be finely adjusted to increase measurement precision and improve measurement resolving power. Furthermore, in the actual projection of the detection light and measurement of the received light, passive type optical distance measurement and ultrasonic distance measurement differ such that distance information and reflectivity information of the object surface can be obtained as measurement environmental information. If reflectivity information is used, it is possible to set more suitable light receiving conditions (e.g., amount of projection light, light reception sensitivity and the like) compared to simply changing set values in accordance with distance.
When optical scanning identical to the measurement time is accomplished as a preliminary measurement before the main measurement, however, the specific time of the operation combining the preliminary measurement and the measurement following thereafter, i.e., the measurement time of one cycle, becomes longer. When the calculation of the preliminary measurement is performed relative to the sampling points of the entirety of the image sensing range, the amount of said calculation is extensive, such that the specific time of the preliminary measurement becomes longer.
In conventional devices, a passive type distance sensor is provided in a rangefinder capable of variable imaging distances according to the mode of use. The distance measurement result is used to set the autofocus (AF) and projection light intensity.
Even when the projection light intensity is adjusted in accordance with the distance measurement result, the amount of received light of the detection light is reduced to less than a lower limit when the reflectivity of the object surface is too low, such that suitable measurement results cannot be obtained. Thus, suitable final measurement results cannot be obtained when the amount of received light exceeds a lower limit due to positive reflectivity of the object surface and the introduction of environmental light. Furthermore, the measurement error increases when measurement distance range set based on the measurement result is outside possible measurement.
Conventionally, when measurement parameters such as reflectivity, distance-to-object, measurement range and the like are unsuitably set, a user will invariably judge that suitable measurement has been accomplished the measurement operation is completed regardless of whether or not a suitable measurement result can actually be obtained.